const mongoose = require("mongoose");

const Order = new mongoose.Schema({
    orderNo:{
        type:String,
        required:true,
        select:true
    },
    toId:{
        type:String,
        required:true,
        select:true
    },
    toName:{
        type:String,
        required:true,
        select:true
    },
    fromId:{
        type:String,
        required:true,
        select:true
    },
    fromName:{
        type:String,
        required:true,
        select:true
    },
    tradeType:{
        type:Number,
        required:true,
        select:true
    },
    tradeMoney:{
        type:Number,
        required:true,
        select:true
    },
    tradeCreateDate:{
        type:Number,
        required:true,
        select:true
    },
    tradeOutDate:{
        type:Number,
        required:true,
        select:true
    },
    tradePayStatus:{
        type:Number,
        default:0,
        select:true
    },
    tradeDesc:{
        type:String,
        required:true,
        select:true
    },
    isDelete:{
        type:Number,
        default:0,
        select:true
    }
})

module.exports = mongoose.model("order",Order,"orders")